<ion-view view-title="知识测评">
    <ion-nav-buttons side="left">
        <back-button></back-button>
        <close-button></close-button>
    </ion-nav-buttons>
    <ion-content ng-class="{'has-loading': isOffline}">
        <p class="light-bg padding Mt15">
            <label class="clr4 yMl5">3</label>
            / 5 知识测评
        </p>

        <div ng-if="!result.show">
            <div ng-repeat="item in param.questions"
                 class="question">
                <div class="panel_head"
                     bo-text="$index+1+'、'+item.question_content">
                </div>
                <ion-radio ng-if="item.question_kind == 0"
                           ng-repeat="answer in item.answer_content"
                           name="{{item.question_no}}"
                           ng-model="item.paper_answer"
                           ng-value="answer.key">
                    <label bo-text="answer.value"></label>
                </ion-radio>
                <ion-checkbox ng-if="item.question_kind == 1"
                              ng-repeat="answer in item.answer_content"
                              ng-model="answer.checked"
                              ng-checked="answer.checked">
                    <label bo-text="answer.value"></label>
                </ion-checkbox>
            </div>
            <div class="btnbox Mt15">
                <a ng-click="submit();"
                   class="btn fs1">
                    提交
                </a>
            </div>
        </div>
        <div ng-if="result.show">
            <p class="item item-text-wrap Mt15">
                本次测评得分：<span ng-bind="result.fraction"></span>，<span ng-if="result.fraction>=80">恭喜通过知识测评！</span><span
                    ng-if="result.fraction<80">未到80分，很遗憾未通过知识测评！</span>
            </p>

            <div class="btnbox Mt15">
                <a class="btn"
                   ng-if="result.fraction>=80"
                   ng-click="next()">
                    下一步
                </a>
                <a class="btn"
                   ng-if="result.fraction<80"
                   ng-click="reset()">
                    重新测评
                </a>
            </div>
        </div>
    </ion-content>
</ion-view>